package com.mtsmda.chapter5;

public class Propagation {
	
	public static void main(String[] args) {
		
		System.out.println(reverse("Dima"));
		
	}
	
	static String reverse(String reverseString){
		String reverseStrR = "";
		if(reverseString.length() <= 0){
			throw new NullPointerException("reverseString.length() < 0");
		}
		for(int i = reverseString.length() - 1; i >= 0; --i){
			reverseStrR += reverseString.charAt(i);
		}
		return reverseStrR;
	}
	
}